<?php
declare (strict_types = 1);

namespace app\controller;





class ApiSwiper extends ApiCommon
{
    public function index()
    {
        $type = input("param.type","xcx");
        if($type == "xcx"){
            $where["board_id"] = 10;
        }
        $list = \app\common\model\Ad::where($where)
            ->select();
        foreach ($list as $k => $v){
            $list[$k]["img"] =handlePic($v["img"]);
        }

        if ($list){
            return json(["code"=>200,"msg"=>"success","data"=>$list]);
        }else{
            return json(["code"=>200,"msg"=>"success","data"=>$list]);
        }
    }
}
